/* ========================================================================	*/
/* Project		 : EMV CUSTOM                                               */
/* Module		 : KSU_EMV                                                  */
/* Creation	Date : 30/08/2001                                               */
/* Author		 : JL MEYRIAL                                               */
/* Description	 : Include for KSU Schemes and 68k applications             */
/*		   Interface data KSU Schemes <--> 68k applications                 */
/* ========================================================================	*/
/* ASCOM FRANCE                                                             */
/* rue Claude Chappe - BP 344                                               */
/* 07500 Guilherand-Granges                                                 */
/* ========================================================================	*/
/* REVISION	HISTORY                                                         */
/* ========================================================================	*/
#ifndef _KSUEMV_H_
#define _KSUEMV_H_

/** API schemes identifiers */
#define API_BASE ( TYPE_APPLI << 16 )

/* CODE SEGMENTS */
/** Temporary Code segment */
#define ID_SCH_TMP    (API_BASE+0x00000000)

/* DATA SEGMENTS */
/** Temporary Data segment */
#define ID_DATA       (API_BASE+0x00001000)

/* SECURED DATA SEGMENTS */
/** Temporary Secured Data segment */
#define ID_SDATA      (API_BASE+0x00002000)

/** Shared Secured Data segments For Pincode (EMVCUSTOM) */
#define ID_SDATA_PIN  ((I_EMVCUST_Type_Appli<<16)+0x00002001)




/** Exchange with Input Pin Scheme via IAPP */
typedef enum
   {
   K_VALID =   0x01,
   K_CORRECT = 0x02,
   K_CANCEL =  0x03,
   K_TIMEOUT = 0x04,
   K_HID_NUM = '*'
   } T_KSUkey;


/* Returned value for KSU scheme  */
#define KSU_OK		        0        /**< Returned value for KSU scheme : successful */
#define KSU_OTHER_ERROR 	0x101    /**< Returned value for KSU scheme : other error */
#define KSU_DALLOC_ERROR 	0x102    /**< Returned value for KSU scheme : dynamic allocation error */
#define KSU_SDALLOC_ERROR 	0x103    /**< Returned value for KSU scheme : statique allocation error */
#define KSU_CANCEL_INPUT 	1
#define KSU_TO_INPUT 	        2

/* IAPP Message for SynchroDial : 68k --> KSU */
#define M_DIAL_SYNC	"START"
/* IAPP Response for InitDial : 68k <-- KSU */
#define R_DIAL_OK	'O'
#define R_DIAL_KO 	'K'


#endif
